package com.hzncc.flowable_diboot.project_contracts.vo;

import com.diboot.core.binding.annotation.*;
import com.diboot.core.vo.FileVO;
import com.diboot.core.vo.LabelValue;
import com.diboot.iam.entity.IamOrg;
import com.diboot.iam.entity.IamPosition;
import com.diboot.iam.entity.IamRole;
import com.diboot.iam.entity.IamUser;
import com.diboot.file.entity.FileRecord;
import com.diboot.tenant.entity.IamTenant;
import com.hzncc.flowable_diboot.project_contracts.entity.ProjectContractUpdate;
import com.hzncc.flowable_diboot.project_contracts.entity.ProjectContractAudit;
import lombok.Getter;
import lombok.Setter;
import lombok.experimental.Accessors;

import java.util.List;
/**
* 项目类合同变更 VO定义
* @author MyName
* @version 1.0
* @date 2024-09-24
* Copyright © MyCorp
*/
@Getter @Setter @Accessors(chain = true)
public class ProjectContractUpdateListVO extends ProjectContractUpdate  {
private static final long serialVersionUID = 1215852491853594940L;
    /**
    * 发货情况 关联字典选项
    */
    @BindDict(
    type = "deliverySituation",
    field = "shippingStatus"
    )
    private LabelValue shippingStatusLabel;

    /**
    * 开票情况 关联字典选项
    */
    @BindDict(
    type = "invoiceSituation",
    field = "inVoicingStatus"
    )
    private LabelValue inVoicingStatusLabel;

    /**
    * 更改类型 关联字典选项
    */
    @BindDict(
    type = "updareType",
    field = "changeType"
    )
    private LabelValue changeTypeLabel;

    /**
    * 申请人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.applicant = id"
     )
    private String applicantLabel;

    /**
    * 项目类合同id 关联信息
    */

    @BindField(
        entity = ProjectContractAudit.class,
        field = "contractCode",
        condition = "this.contract_id = id"
     )
    private String contractIdLabel;

    /**
    * 创建人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.create_by = id"
     )
    private String createByLabel;

    /**
    * 更新人 关联信息
    */

    @BindField(
        entity = IamUser.class,
        field = "realname",
        condition = "this.update_by = id"
     )
    private String updateByLabel;

    @BindEntityList(
            entity = FileRecord.class,
            condition = "this.auditAttachment = id",
            splitBy = ","
    )
    private List<FileVO> auditAttachmentFiles;
}